<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Jialeo\LaravelSchemaExtend\Schema;

class AlterSystemNotifyCenterAddDelayFields extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('system_notify_center', function (Blueprint $table) {
            $table->unsignedInteger('notifyType')->default(1)->comment('推送类型 1 - 立即推送 2 - 延时推送')->after("title");
            $table->unsignedInteger('delayNotifyTime')->default(0)->comment('延时推送时间')->after("notifyType");
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('system_notify_center', function (Blueprint $table) {
            $table->dropColumn('notifyType');
            $table->dropColumn('delayNotifyTime');
        });
    }
}
